﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
checkadmin(1)
dim title,author,company,tel,typenames,content,act,id,email,visible,fax
title=HTMLEncode(request.Form("title"))
If (title="") Then
historygoback("请填写标题")
End If 
author=HTMLEncode(request.Form("author"))
fax=HTMLEncode(request.Form("fax"))
company=HTMLEncode(request.Form("company"))
email=HTMLEncode(request.Form("email"))
tel=HTMLEncode(request.Form("tel"))
content=HTMLEncode(request.Form("content"))
If (content="") Then
historygoback("请填写内容")
End If 
act=HTMLEncode(request.Form("act"))
id=HTMLEncode(request.Form("id"))
visible=HTMLEncode(request.Form("visible"))
If act="modifysave" Then
	Dim rsa,sqla
	Set rsa = Server.CreateObject("ADODB.Recordset")
	sqla = "select * from [c_comment] where id="&id
	rsa.open sqla,conn,1,3
	If Not rsa.eof Then 
	rsa("title")=title
	rsa("author")=author
	rsa("company")=company
	rsa("email")=email
	rsa("tel")=tel
	rsa("fax")=fax
	rsa("content")=content
	rsa("visible")=visible
	rsa("modifytime")=Now()
	rsa.update
	End If 
	rsa.close
	Set rsa=Nothing 
	response.redirect("showmsg.asp?from=comment_list.asp&msg=ModifySuccess")
End If 
%>